package com.qf.czh.vhr.Controller;

import com.qf.czh.vhr.Service.MenuService;
import com.qf.czh.vhr.entity.Menu;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class MenuController {
    @Autowired
    MenuService menuService;

    @GetMapping("/menu")
    @ResponseBody
    public List<Menu> getMenuByCurrentHrId(){
       List<Menu> list =  menuService.getMenuByCurrentHrId();
       return list;
    }

}
